<?php
/**
 * (commands)
 */
namespace App\Console\Commands\Operation;

use Illuminate\Console\Command;
use App\Logic\Operation\TCTFile as LTCTFile;
class TCTFile extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'operation:check-file {start_date} {end_date} {country_id} {classify_id}';

    /**
     * The console command description.
     * @var string
     */
    protected $description = 'operation check-file {start_date} {end_date} {country_id} {classify_id}';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     */
    public function handle()
    {
        $start = $this->argument('start_date');
        $end = $this->argument('end_date');
        $countryId = $this->argument('country_id');
        $classifyId = $this->argument('classify_id');
        if(!$start || !$end || !$countryId || !$classifyId){
            $this->error('请提供相应参数!');
        }else{
            LTCTFile::handle($start,$end,$countryId,$classifyId);
            $this->info('同步完成！');
        }
    }
}
